﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RooHui.External.Promotion
{
    public class PromotionFactory
    {
        public bool Excutor(int code,decimal amount)
        {
            switch (code)
            { 
                default:
                    return false;
                case 1:
                    //四月投资大赢家，投资就额外奖励1.5%收益
                    return DateTime.Now.Month == 4;
                case 2:
                    //平台让利大派送，第一笔投资满1000元，就送200收益
                    return amount >= 10000;
                case 3:
                    //我是投资达人，投资即有20%的几率获得追加1.5%收益及200元现金奖励
                    return new Random().Next(1, 100) <= 20;
            }
        }
    }
}
